package cn.JHai.rbac.mapper;

import cn.JHai.rbac.domain.Role;
import cn.JHai.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    Long selectForCount(QueryObject queryObject);

    List<Role> pageSelect(QueryObject queryObject);

    int insertRoleAndPermissionRelation(@Param("roleId") Long roleId, @Param("permissionId") Long ids);

    void deleteRelation(Long id);

    List<Role> selectRolesByEmptyId(Long id);
}